package com.serverImpl;

import com.beans.File;
import com.mapper.FileMapper;
import com.server.FileService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 古嘉琦
 * @since 2023-10-23
 */
@Service@Transactional
public class FileServiceImpl implements FileService {
    @Autowired
    private FileMapper fileMapper;
   /* public File SearchFilePathByFileID(@Param("fileID") Integer fileID){
        return (File) fileMapper.searchFilePathByFileID(fileID);
    }*/

    public int InsertSelective(File file){
        return fileMapper.insertSelective(file);
    }

    public int UpdateSelective(File file){
        return fileMapper.updateSelective(file);
    }

    public int DeleteByFileName(@Param("fileName") String fileName){
        return fileMapper.deleteByFileName(fileName);
    }
}
